//
//  MyPurchaseCollectionViewCell.m
//  YYPHSpeedJump
//
//  Created by speedjump on 16/1/28.
//  Copyright © 2016年 sujiang. All rights reserved.
//

#import "MyPurchaseCollectionViewCell.h"

@implementation MyPurchaseCollectionViewCell

- (void)awakeFromNib {
    // Initialization code
    
    
   
    if ([self.model.status isEqualToString:@"3"]) {
        self.baseImage.image = [UIImage imageNamed:@"即将上线"];

    }
    if ([self.model.status isEqualToString:@"4"]) {
        self.baseImage.image = [UIImage imageNamed:@"完成"];
    }
}
- (void)setModel:(PurchaseModel *)model
{
    self.zanNumber.text = [NSString stringWithFormat:@"%@/100",model.up_num];
    NSArray *timeArr = [model.create_time componentsSeparatedByString:@" "];
    self.timeLable.text = [NSString stringWithFormat:@"%@",timeArr[0]];
    self.goodName.text = [NSString stringWithFormat:@"%@",model.wish_commodity_name];
    NSArray *arr= [model.img_url componentsSeparatedByString:@";"];
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:arr[0]] placeholderImage:nil];
    _model =model;
    
}
@end
